From: Sander Dijkhuis Date: Mon, 13 Jul 2009 12:44:54 +0000 (+0200) Subject: Bug 588445 - Use BigBox vertical alignment for the clock X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~11207 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f7a82d6400180fcc614146573cbf92adc0c83780;p=gnome-shell.git Bug 588445 - Use BigBox vertical alignment for the clock panel.js: Replace the manual vertical padding calculation for the panel's clock with an y_align property on its BigBox container. --- diff --git a/js/ui/panel.js b/js/ui/panel.js index a7f682769..bddb6ae68 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -109,9 +109,7 @@ Panel.prototype = { this._clock = new Clutter.Text({ font_name: "Sans Bold 16px", text: "" }); - let pad = (PANEL_HEIGHT - this._clock.height) / 2; - let clockbox = new Big.Box({ padding_top: pad, - padding_bottom: pad, + let clockbox = new Big.Box({ y_align: Big.BoxAlignment.CENTER, padding_left: 4, padding_right: 4 }); clockbox.append(this._clock, Big.BoxPackFlags.NONE);